import { BaseEntity } from '@cool-midway/core';
import { Column, Index, Entity } from 'typeorm';
/**
 * 分佣表
 */
@Entity('doupiaopiao_commission')
export class DoupiaopiaoCommissionEntity extends BaseEntity {
  @Column({ comment: '用户ID' })
  userId: string;

  @Column({ comment: '订单Id', length: 50 })
  orderId: string;

  @Column({ comment: '是否退款 1 未退款 -1 已退款' })
  state: number;

  @Column({ comment: '是否结算 0 否 1 是' })
  payState: number;

  @Column({
    comment: '订单总价格',
    type: 'decimal',
    precision: 10,
    scale: 2,
    default: 0,
  })
  totalPrice: number;

  @Column({ comment: '下单客户等级' })
  level: number;

  @Column({
    comment: '结算佣金',
    type: 'decimal',
    precision: 10,
    scale: 2,
    default: 0,
  })
  endPrice: number;
}
